package com.hiof.moraa.server.service.model;

import java.util.Date;

/**
 *
 * @author Bergy
 */
public class LiveLocationFeed extends Feed {

    private String attendantCode;
    private double lat;
    private double lng;
    private double height;
    double speed;

    public LiveLocationFeed(int userId, String userName, String fullname, String profilePicture, Date timestamp, String attendantCode, double lat, double lng, double height, double speed) {
        super(userId, userName, fullname, profilePicture, timestamp);
        this.attendantCode = attendantCode;
        this.lat = lat;
        this.lng = lng;
        this.height = height;
        this.speed = speed;
    }

    public void setLat(double lat) {
        this.lat = lat;
    }

    public void setLng(double lng) {
        this.lng = lng;
    }

    public void setHeight(double height) {
        this.height = height;
    }

    public String getAttendantCode() {
        return attendantCode;
    }

    public double getHeight() {
        return height;
    }

    public double getLat() {
        return lat;
    }

    public double getLng() {
        return lng;
    }

    public double getSpeed() {
        return speed;
    }

    public void setSpeed(double speed) {
        this.speed = speed;
    }
    
    public GoogleGpsGeoPoint getGoogleGeoPoint(){
        return new GoogleGpsGeoPoint(lat, lng, height);
    }       
    
    @Override
    public String getDescription() {
        return "passed location (" + df.format(lat) + ", " + df.format(lng) + ", " + df.format(height) + ")";
    }

    @Override
    public String getType() {
        return "LiveLocationFeed";
    }    
}
